<template>
  <div>
    <span>{{ todo.title }}</span>
    <span>{{ todo.description }}</span>
    <button @click="deleteTodo(todo.id)">删除</button>
  </div>
</template>

<script>
export default {
  props: ['todo'],
  methods: {
    deleteTodo(id) {
      this.$emit('delete', id)
    },
  },
}
</script>
